package com.kotlin.flong.coroutines

import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking

/**
 * @Author:liangjl
 * @Date: 2020/7/6-19:45
 * @Eamil:jilongliang@sina.com
 * @Description:
 * Job的使用
 */
fun main() = runBlocking {
    val myjob = GlobalScope.launch {
        delay(1000)
        println("kotlin coroutines")
    }

    println("Hello")
    //suspend
    myjob.join()
    println("World")
}